/*
 * Created by JFormDesigner on Tue Nov 29 22:40:50 ICT 2011
 */

package realestatemarketclient;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import com.jgoodies.forms.layout.*;

/**
 * @author Nhan Nhan
 */
public class MainForm extends JFrame {
    public MainForm() {
        initComponents();
    }

    private void btnPostingSaleActionPerformed(ActionEvent e) {
        JFrame f = new PostingSaleForm(); 
        f.setVisible(true);
    }

    private void customerMenuItemActionPerformed(ActionEvent e) {
        // TODO add your code here
        JFrame f = new NumOfCustomerForm();
        f.setVisible(true);
    }

    private void realTypeMenuItemActionPerformed(ActionEvent e) {
        // TODO add your code here
        JFrame f = new AccountingCustomerForm();
        f.setVisible(true);
    }

    private void newsMenuItemActionPerformed(ActionEvent e) {
        // TODO add your code here
        JFrame f = new NewsInMonthForm();
        f.setVisible(true);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        // Generated using JFormDesigner Evaluation license - Tran Cong
        menuBar1 = new JMenuBar();
        mnThongKe = new JMenu();
        customerMenuItem = new JMenuItem();
        realTypeMenuItem = new JMenuItem();
        newsMenuItem = new JMenuItem();
        menu2 = new JMenu();
        toolBar1 = new JToolBar();
        btnPostingSale = new JButton();

        //======== this ========
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);
        setTitle("Qu\u1ea3n L\u00fd Rao B\u00e1n \u0110\u1ecba \u1ed0c");
        setName("frMain");
        setFont(new Font("Dialog", Font.PLAIN, 12));
        Container contentPane = getContentPane();
        contentPane.setLayout(null);

        //======== menuBar1 ========
        {
            menuBar1.setToolTipText("Th\u1ed1ng k\u00ea");

            //======== mnThongKe ========
            {
                mnThongKe.setText("Th\u1ed1ng k\u00ea");
                mnThongKe.setIcon(UIManager.getIcon("FileView.directoryIcon"));

                //---- customerMenuItem ----
                customerMenuItem.setText("Th\u1ed1ng k\u00ea kh\u00e1ch h\u00e0ng");
                customerMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        customerMenuItemActionPerformed(e);
                    }
                });
                mnThongKe.add(customerMenuItem);

                //---- realTypeMenuItem ----
                realTypeMenuItem.setText("Th\u1ed1ng k\u00ea \u0111\u1ecba \u1ed1c");
                realTypeMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        realTypeMenuItemActionPerformed(e);
                    }
                });
                mnThongKe.add(realTypeMenuItem);

                //---- newsMenuItem ----
                newsMenuItem.setText("Th\u1ed1ng k\u00ea tin rao b\u00e1n");
                newsMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        newsMenuItemActionPerformed(e);
                    }
                });
                mnThongKe.add(newsMenuItem);
            }
            menuBar1.add(mnThongKe);

            //======== menu2 ========
            {
                menu2.setText("Tin T\u1ee9c");
                menu2.setIcon(UIManager.getIcon("FileView.computerIcon"));
            }
            menuBar1.add(menu2);
        }
        setJMenuBar(menuBar1);

        //======== toolBar1 ========
        {

            //---- btnPostingSale ----
            btnPostingSale.setText("\u0110\u0103ng Tin Rao B\u00e1n");
            btnPostingSale.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnPostingSaleActionPerformed(e);
                }
            });
            toolBar1.add(btnPostingSale);
        }
        contentPane.add(toolBar1);
        toolBar1.setBounds(new Rectangle(new Point(5, 5), toolBar1.getPreferredSize()));

        contentPane.setPreferredSize(new Dimension(800, 600));
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
    // Generated using JFormDesigner Evaluation license - Tran Cong
    private JMenuBar menuBar1;
    private JMenu mnThongKe;
    private JMenuItem customerMenuItem;
    private JMenuItem realTypeMenuItem;
    private JMenuItem newsMenuItem;
    private JMenu menu2;
    private JToolBar toolBar1;
    private JButton btnPostingSale;
    // JFormDesigner - End of variables declaration  //GEN-END:variables
}
